var t = getApp();

Page({
    data: {
        language: "",
        dataObj: {},
        ios_virtual_pay: !1
    },
    onLoad: function(t) {
        this.getBalance();
        try {
            var a = wx.getStorageSync("ios_virtual_pay");
            a && this.setData({
                ios_virtual_pay: a
            });
        } catch (t) {
            console.log(t);
        }
    },
    onReady: function() {
        var t = wx.getStorageSync("langIndex");
        this.setData({
            language: t.en
        });
    },
    onShow: function() {
        this.getBalance();
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    getBalance: function() {
        var a = this, e = t.getNetAddresss("plugin.froze.Frontend.Controllers.page.index");
        t._getNetWork({
            url: e,
            success: function(t) {
                var e = t.data;
                1 === e.result ? a.setData({
                    dataObj: e.data
                }) : wx.showToast({
                    title: e.msg,
                    icon: "none",
                    duration: 2e3
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    gotoPage: function(t) {
        console.log(t);
        var a = t.target.dataset.url || t.currentTarget.dataset.url;
        if ("RechargeCoin" == a && this.data.ios_virtual_pay) return wx.showModal({
            title: "提示",
            content: "十分抱歉，由于相关规定，你暂时无法在这里充值！",
            confirmText: "知道了",
            showCancel: !1,
            success: function(t) {}
        }), !1;
        "overseas_explain" != a ? wx.navigateTo({
            url: "/packageB/member/" + a + "/" + a
        }) : this.setData({
            show: !0
        });
    },
    onClickLeft: function() {
        this.setData({
            show: !1
        });
    },
    onClickRight: function() {
        wx.navigateTo({
            url: "/packageB/member/overseas_list/overseas_list?type=FrozenCoin"
        });
    }
});